<?php use_helper('Javascript');?>
<div>
<h1>Lista de Domicilios de Deudor</h1>

<table>
  <thead>
    <tr>
      <th>Calle</th>
      <th>N&uacute;mero</th>
      <th>Comuna</th>
      <th>Cuidad</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($deudor_domicilioList as $deudor_domicilio): ?>
    <tr>
      <td><?php echo $deudor_domicilio->getCalle() ?></td>
      <td><?php echo $deudor_domicilio->getNumero() ?></td>
      <td><?php echo $deudor_domicilio->getComuna() ?></td>
      <td><?php echo $deudor_domicilio->getCuidad() ?></td>
      <td><?php switch($accion):
					case 'show':
      					echo link_to_remote('Detalles', array(
      						'update' => 'acciones_deudor',
      						'url' => 'administracion/showdeudordomicilio?id='.$deudor_domicilio->getId(),
      						'loading'=> visual_effect('appear','loading').
										visual_effect('highlight','list-search-deudordomicilio', array('duration' => 0.5)).
										visual_effect('fade','list-search-deudordomicilio', array('duration' => 0.5)),
							'complete' => visual_effect('fade','loading', array('duration' => 1.0)),
      					));
      					break;
					case 'edit':
						echo link_to_remote('Editar', array(
      						'update' => 'acciones_deudor',
      						'url' => 'administracion/editdeudordomicilio?iddeudordomicilio='.$deudor_domicilio->getId().'&iddeudor='.$deudor_domicilio->getDeudorId(),
      						'loading'=> visual_effect('appear','loading').
										visual_effect('highlight','list-search-deudordomicilio', array('duration' => 0.5)).
										visual_effect('fade','list-search-deudordomicilio', array('duration' => 0.5)),
							'complete' => visual_effect('fade','loading', array('duration' => 1.0)),
      					)); 
						break;
					default : 
						echo "Otra accion";
				endswitch;
      		?>
      </td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

<?php echo link_to_function('Cerrar ventana',
	visual_effect('appear','loading').
	visual_effect('highlight','list-search-deudordomicilio', array('duration' => 0.5)).
	visual_effect('fade','list-search-deudordomicilio', array('duration' => 0.5)).
	visual_effect('fade','loading', array('duration' => 1.0)));
?>
</div>